package fib;

public class Solution {
    long[] arr = new long[101];
    public int fib(int n) {
        if(n==0){
            return 0;
        }
        if(n==1){
            return 1;
        }
        if(arr[n]!=0){
            return (int)arr[n];
        }
        long value = (long)fib(n-1)+fib(n-2)%1000000007;
        arr[n]=value;
        return (int)value;
    }
}
